from sqlalchemy import Column, Integer, String,DateTime
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class Kitting_Product_Table(Base):


    __tablename__ = 'Kitting_Product'

    # id = Column(Integer, primary_key=True)
    # name = Column(String)
    # email = Column(String)
    # id = Column(Integer, autoincrement=True)
    sn = Column(String, primary_key=True)
    unit_type = Column(String)
    boxnumber = Column(String)
    date = Column(DateTime)
    OrderNo = Column(String)
    EID = Column(String)
    # sn, unit_type, boxnumber, date, OrderNo, EID




class Kitting_ProductKeyMaterial_Table(Base):
    __tablename__ = 'Kitting_ProductKeyMaterial'

    # id = Column(Integer, primary_key=True)
    # name = Column(String)
    # email = Column(String)

    F_id = Column(String, primary_key=True)
    F_Unittype = Column(String)
    F_keysn = Column(String)
    f_boxnumber = Column(String)
    f_keymaterial = Column(String)
    F_materialsn = Column(String)
    F_datetime = Column(String)
    F_CreatorTime = Column(String)


if __name__=='__main__':
    from datetime import datetime
    date = datetime.now()
    kp_record = Kitting_Product_Table(
        sn='sn', unit_type='unit_type', boxnumber='boxnumber', date=date,
        OrderNo='OrderNo',EID= 'GLK')
    print(kp_record.__dict__)

